<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"/>
	<script type="text/javascript" src="http://code.google.com/apis/gears/gears_init.js"/>
	<script type="text/javascript" src="#{request.contextPath}/common/js/gMaps.js"/>
	
	<h:form id="coordsForm" >

	<s:remote include="createTravelBean"/>
		<h:messages />

		<rich:panel>
		<f:facet name="header">Choosing from and to locations in gMaps</f:facet>
			<h:panelGrid columns="3">
			
			<s:div > 
				
				<rich:gmap 		enableDragging="true" 
								gmapVar="map" 
								zoom="8"
								mapType="G_NORMAL_MAP"  
								style="width: 400px; height: 300px;"
								oninit="initMap(map,1,#{conversation.id},'createTravelBean')">
				</rich:gmap>    
				
			</s:div>
				
			<s:div styleClass="info" >

				
		    	
		    	<s:decorate  template="/layout/edit.xhtml">
			    	<ui:define name="label">From coords :</ui:define>
			    	<div id="fromInf">
			    	</div>
				</s:decorate>
		    	<s:decorate  template="/layout/edit.xhtml">
			    	<ui:define name="label">To coords :</ui:define>
			    	<div id="toInf">
			    	</div>
				</s:decorate>
				
		    	<s:decorate  template="/layout/edit.xhtml">
		    	<h:commandButton id="continue"
                          value="Continue"
                         action="#{createTravelBean.chooseCoordsAction}"/>
                </s:decorate>

		    </s:div>
		    
		    
		    <s:div>
				<rich:gmap 		enableDragging="true" 
								gmapVar="map2" 
								zoom="8"
								mapType="G_NORMAL_MAP"  
								style="width: 400px; height: 300px;"
								oninit="initMap(map2,2 ,#{conversation.id},'createTravelBean')">
				</rich:gmap>    
			</s:div>
			
		    
		    
		    </h:panelGrid>
    	</rich:panel>
	</h:form>

 
        
</ui:define>
</ui:composition>
